package com.dlry.web.valid;

import javax.validation.constraints.Pattern;

public class PasswordForm {
	private static final String regx = "^[a-zA-Z0-9]{6,21}$";
	@Pattern(regexp = regx, message = "密码必须是6到20位的数字或者字母")
	private String oldPassword;
	@Pattern(regexp = regx, message = "密码必须是6到20位的数字或者字母")
	private String newPassword1;
	@Pattern(regexp = regx, message = "确认密码和新密码不一致")
	private String newPassword2;

	public String getOldPassword() {
		return oldPassword;
	}

	public void setOldPassword(String oldPassword) {
		this.oldPassword = oldPassword;
	}

	public String getNewPassword1() {
		return newPassword1;
	}

	public void setNewPassword1(String newPassword1) {
		this.newPassword1 = newPassword1;
	}

	public String getNewPassword2() {
		return newPassword2;
	}

	public void setNewPassword2(String newPassword2) {
		this.newPassword2 = newPassword2;
	}

}
